﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using OnlineVideos.UI;
using Common.Utilities;
using Common.Library;
using System.Windows.Navigation;
using MyToolkit.Multimedia;
using System.ComponentModel;

namespace OnlineVideos
{
    public partial class DownloadsHistory : PhoneApplicationPage
    {
        public DownloadsHistory()
        {
            InitializeComponent();
            Loaded += new RoutedEventHandler(DownloadsHistory_Loaded);
        }

        void DownloadsHistory_Loaded(object sender, RoutedEventArgs e)
        {
            LoadAds();
        }
        private void imgTitle_MouseEnter(object sender, MouseEventArgs e)
        {
            NavigationService.Navigate(NavigationHelper.MainPanoramaPage);
        }
        private void LoadAds()
        {
            try
            {
               // PageHelper.LoadAdControl(LayoutRoot, adstackplHistory);
            }
            catch (Exception ex)
            {
                Exceptions.SaveOrSendExceptions("Exception in LoadAds Method In DownloadsHistory file", ex);
                string excepmess = "Exception in LoadAds Method In DownloadsHistory file.\n\n" + ex.Message + "\n\n StackTrace :- \n" + ex.StackTrace;
            }

        }
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            YouTube.CancelPlay();
        }

        protected override void OnBackKeyPress(CancelEventArgs e)
        {
            if (YouTube.CancelPlay())
                e.Cancel = true;

            base.OnBackKeyPress(e);
        }
    }
}